package lzyc.pointsManagement.business.company.controller;

import lzyc.pointsManagement.business.company.domain.CompanyInfo;
import lzyc.pointsManagement.business.company.service.CompanyInfoService;
import lzyc.pointsManagement.common.core.controller.BaseController;
import lzyc.pointsManagement.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (CompanyInfo)表控制层
 *
 * @author yangyang
 * @since 2024-03-10 17:09:15
 */
@RestController
@RequestMapping("/api/v1/dept/info")
public class CompanyInfoController extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CompanyInfoService companyInfoService;

    /**
     * 修改
     * 
     * @param companyInfo
     * @return
     */
    @PostMapping("/update")
    @ResponseBody
    public AjaxResult update(@RequestBody CompanyInfo companyInfo) {
        return toAjax(companyInfoService.update(companyInfo));
    }

    /**
     * 获取支部信息
     * 
     * @return
     */
    @PostMapping("/get")
    @ResponseBody
    public AjaxResult getCompanyInfo() {
        return success(companyInfoService.getCompanyInfo());
    }

}